package com.example.demo.controller;

import com.example.demo.entity.MistakeType;
import com.example.demo.entity.ResponseInfo;
import com.example.demo.service.MistakeTypeService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/mistakeType")
public class MistakeTypeController {
    @Resource
    private MistakeTypeService mistakeTypeService;

    @GetMapping("/findall")
    public ResponseInfo<List<MistakeType>> findAll() {
        return ResponseInfo.successInfo(mistakeTypeService.getMistakeTypeAll());
    }
}
